import requests
import pprint
with open('xml_xml.xml',encoding='utf-8')as fp:
    xml=fp.read()
headers = {'Content-Type':'application/xml'}
#遇到编码报错时候，对body进行encode
r = requests.post("https://httpbin.ceshiren.com/post",data=xml.encode('utf-8'),headers=headers)
pprint.pprint(r.json())